<?php

class WSB_Dialog
{

	const YES_OPTION = 'YES';
	const NO_OPTION = 'NO';

	/**
	 * @param string $question
	 * @return string
	 */
	public static function ConfirmDialog($question)
	{
		$request = new Zend_Controller_Request_Http();
		if($request->getPost('ConfirmDialogYesButton') != '') {
			return self::YES_OPTION;
    	}
    	if($request->getPost('ConfirmDialogNoButton') != '') {
			return self::NO_OPTION;
    	}
		$view = new Zend_View();
		$view->doctype('XHTML1_TRANSITIONAL');
		$view->setScriptPath(WSB_APP_PATH);
		$view->addHelperPath(WSB_APP_PATH . 'library/WSB/View/Helper/', 'WSB_View_Helper');
		$view->strictVars(true);
		$view->question = $question;
		echo $view->render('library/WSB/Dialog/Confirm.php');
		return null;
	}

}
